Skip to content

Add some color to the filters and update occupancy links#689

Merged
RyaliNvidia merged 3 commits intomainfrom
ryali/ui-qol
Mar 11, 2026
Merged

Add some color to the filters and update occupancy links#689
RyaliNvidia merged 3 commits intomainfrom
ryali/ui-qol

Conversation

@RyaliNvidia
Copy link
Contributor

@RyaliNvidia RyaliNvidia commented Mar 11, 2026

Making the filter options be highlighted differently for better readability:
Screenshot 2026-03-11 133343
Screenshot 2026-03-11 133941

Making the links in the occupancy page nicercleaner. Clicking the row now redirects you instead of just the username + added tooltip:
Screenshot 2026-03-11 134112
Screenshot 2026-03-11 135301

Issue #None

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features

    • Row tooltip support in data tables—hover rows to see contextual titles.
    • Child rows in occupancy tables now navigate directly to workflows via row links.
  • Bug Fixes

    • Prevented unintended navigation when selecting text in table rows.
  • Style

    • Updated child row styling to indicate clickability and a cleaner non-link appearance.
  • UX

    • Filter suggestions display improved with formatted prefix labels.

@RyaliNvidia RyaliNvidia requested a review from a team as a code owner March 11, 2026 20:56
@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2a9d155c-f95b-4eb3-9eae-8898d7fae104

📥 Commits

Reviewing files that changed from the base of the PR and between 08199cf and 619effe.

📒 Files selected for processing (1)
  • src/ui/src/components/data-table/virtual-table-body.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/ui/src/components/data-table/virtual-table-body.tsx

📝 Walkthrough

Walkthrough

Exposes an optional getRowTitle for data table rows, updates filter-bar suggestion rendering, exports buildWorkflowsUrl, and adds router-based navigation and pointer styling for occupancy child rows while preserving parent-row expand/collapse behavior.

Changes

Cohort / File(s) Summary
Data Table Tooltip
src/ui/src/components/data-table/data-table.tsx, src/ui/src/components/data-table/virtual-table-body.tsx
Added `getRowTitle?: (row) => string
Filter Bar Suggestion Rendering
src/ui/src/components/filter-bar/filter-bar-dropdown.tsx
Changed rendering for non-field suggestions to render a prefixed <span class="fb-suggestion-field-prefix"> plus the sliced label for both regular and virtualized items.
Occupancy Navigation & Styling
src/ui/src/features/occupancy/components/occupancy-data-table.tsx, src/ui/src/features/occupancy/components/occupancy-column-defs.tsx, src/ui/src/features/occupancy/styles/occupancy.css
Exported buildWorkflowsUrl; child rows now produce hrefs/titles and navigate via Next.js router.push(buildWorkflowsUrl(...)) while parents toggle expansion. Changed child-row cursor to pointer and removed link underline/focus.

Sequence Diagram(s)

sequenceDiagram
  participant User as "User"
  participant Table as "OccupancyTable\n(click handler)"
  participant URLBuilder as "buildWorkflowsUrl"
  participant Router as "Next.js Router"

  Note over User,Table: Child row clicked
  User->>Table: click child row
  Table->>URLBuilder: buildWorkflowsUrl(row, groupBy, searchChips)
  URLBuilder-->>Table: workflowsUrl
  Table->>Router: router.push(workflowsUrl)
  Router-->>User: navigates to workflows page

  Note over User,Table: Parent row clicked
  User->>Table: click parent row
  Table-->>Table: toggle expansion state
  Table-->>User: expansion toggled
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I twitch my whiskers, tap the keys,

Rows now whisper titles in the breeze,
Child hops carry me to distant views,
Parents yawn and stretch—expand their news,
A tiny hop, and navigation's true.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title partially addresses the changeset but obscures the primary change. The PR implements native tooltips, text selection guards in table navigation, and styling updates—the 'color' reference is vague and misleading. Consider a more specific title like 'Add row tooltips and improve occupancy link navigation' to better reflect the main technical changes across multiple components.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ryali/ui-qol

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/ui/src/features/occupancy/components/occupancy-data-table.tsx (1)

116-133: Consolidate child workflow URL derivation to one source.

buildWorkflowsUrl(row, groupBy, searchChips) is repeated in both click and href paths. Extract a single getChildWorkflowsUrl callback and reuse it to avoid drift.

As per coding guidelines, "Single source of truth for each concept - avoid multiple representations of the same data."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/ui/src/features/occupancy/components/occupancy-data-table.tsx` around
lines 116 - 133, Create a single getChildWorkflowsUrl callback that returns
buildWorkflowsUrl(row, groupBy, searchChips) for a child row and replace the
duplicated calls in handleRowClick and getRowHref with this new callback; ensure
getChildWorkflowsUrl is memoized with useCallback and includes groupBy and
searchChips in its dependency array, then update handleRowClick (which uses
onToggleExpand and router) to call router.push(getChildWorkflowsUrl(row)) for
child rows and update getRowHref to return getChildWorkflowsUrl(row) for child
rows, leaving parent behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/ui/src/features/occupancy/components/occupancy-column-defs.tsx`:
- Around line 199-203: The child-row cell rendering replaced a semantic Link
with a non-semantic span (see the branch checking original._type === "child" in
occupancy-column-defs.tsx), which removes native link semantics and hurts
accessibility; restore a semantic link element (use the same Link component or
an anchor) for the child display so keyboard and screen-reader affordances are
preserved, ensure the Link includes the correct href/route and any existing
onClick/row-click navigation logic is preserved (transfer handlers or call the
row navigation from the Link's onClick) and keep the displayed text as
original.key so behavior and appearance remain the same.

---

Nitpick comments:
In `@src/ui/src/features/occupancy/components/occupancy-data-table.tsx`:
- Around line 116-133: Create a single getChildWorkflowsUrl callback that
returns buildWorkflowsUrl(row, groupBy, searchChips) for a child row and replace
the duplicated calls in handleRowClick and getRowHref with this new callback;
ensure getChildWorkflowsUrl is memoized with useCallback and includes groupBy
and searchChips in its dependency array, then update handleRowClick (which uses
onToggleExpand and router) to call router.push(getChildWorkflowsUrl(row)) for
child rows and update getRowHref to return getChildWorkflowsUrl(row) for child
rows, leaving parent behavior unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3884a781-e5f6-4e73-87bc-542d9ac97e55

📥 Commits

Reviewing files that changed from the base of the PR and between a484225 and a56c029.

📒 Files selected for processing (6)
  • src/ui/src/components/data-table/data-table.tsx
  • src/ui/src/components/data-table/virtual-table-body.tsx
  • src/ui/src/components/filter-bar/filter-bar-dropdown.tsx
  • src/ui/src/features/occupancy/components/occupancy-column-defs.tsx
  • src/ui/src/features/occupancy/components/occupancy-data-table.tsx
  • src/ui/src/features/occupancy/styles/occupancy.css

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/ui/src/features/occupancy/components/occupancy-column-defs.tsx (1)

199-209: ⚠️ Potential issue | 🟡 Minor

Visual affordance missing for child row link—add hover and focus styling.

The tabIndex={-1} is correct here: child rows are already keyboard accessible via the row itself (which receives tabIndex={0} when onRowClick is provided). Both the row and the Link navigate to the same URL via buildWorkflowsUrl(), so removing the link from the tab order avoids duplicate focus targets. The stopPropagation() correctly prevents the row click from firing when the link is clicked directly.

However, removing the hover/focus underline styling makes the link appear as plain text, reducing the visual affordance that it's interactive. Add back hover and focus-visible styles to maintain clarity for visual users:

Example styling
className="pl-2 text-sm text-zinc-600 dark:text-zinc-400 hover:underline focus-visible:underline"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/ui/src/features/occupancy/components/occupancy-column-defs.tsx` around
lines 199 - 209, The child-row Link rendering (inside the conditional checking
original._type === "child") currently has tabIndex={-1} and loses hover/focus
affordance; update the Link's className to include hover and focus-visible
underline styles (e.g., add hover:underline and focus-visible:underline to the
existing "pl-2 text-sm text-zinc-600 dark:text-zinc-400") so the link remains
visually identifiable while keeping tabIndex={-1} and the onClick
stopPropagation behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/ui/src/features/occupancy/components/occupancy-column-defs.tsx`:
- Around line 199-209: The child-row Link rendering (inside the conditional
checking original._type === "child") currently has tabIndex={-1} and loses
hover/focus affordance; update the Link's className to include hover and
focus-visible underline styles (e.g., add hover:underline and
focus-visible:underline to the existing "pl-2 text-sm text-zinc-600
dark:text-zinc-400") so the link remains visually identifiable while keeping
tabIndex={-1} and the onClick stopPropagation behavior unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0ffa2f72-4df2-403f-9a7f-ab54c2f0e3e9

📥 Commits

Reviewing files that changed from the base of the PR and between a56c029 and 08199cf.

📒 Files selected for processing (1)
  • src/ui/src/features/occupancy/components/occupancy-column-defs.tsx

@RyaliNvidia RyaliNvidia merged commit a684427 into main Mar 11, 2026
9 checks passed
@RyaliNvidia RyaliNvidia deleted the ryali/ui-qol branch March 11, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants